import request from '@/utils/request'

//获取用户列表
export function getUserList(data){
    return request({
        url:'/auth/user/list',
        method:'post',
        data
    })
} 
//保存用户信息
export function saveUserInfo(data){
    return request({
        url:'/auth/user/save',
        method:'post',
        data
    })
}
//获取用户信息
export function getUserInfo(id){
    return request({
        url:'/auth/user/info?id='+id,
        method:'get',
    })
}
//删除用户信息
export function deleteUserInfo(id){
    return request({
        url:'/auth/user/delete?id='+id,
        method:'delete'
    })
}
//获取用户角色
export function getUserRole(id){
    return request({
        url:'/auth/user/userrole?id='+id,
        method:'get'
    })
}
//用户授权
export function authoriza(data){
    return request({
        url:'/auth/user/authoriza',
        method:'post',
        data
    })
}
//获取所有用户
export function getUserDictionary(){
    return request({
        url:'/auth/user/dictionary',
        method:'get'
    })
}
//获取数据权限用户
export function getUserPermissionData(data){
    return request({
        url:'/auth/user/userdata',
        method:'post',
        data
    })
}
//获取用户日志
export function getUserLogList(data){
    return request({
        url:'/auth/user/userLogList',
        method:'post',
        data
    })
}
//获取用户权限
export function getUserPermission(id){
    return request({
        url:'/auth/user/permission?id='+id,
        method:'get'
    })
}
//重置用户密码
export function resetPwd(id){
    return request({
        url:'/auth/user/resetpwd?id='+id,
        method:'post'
    })
}
//锁定用户
export function lock(id){
    return request({
        url:'/auth/user/lock?id='+id,
        method:'post'
    })
}
//解锁用户
export function unLock(id){
    return request({
        url:'/auth/user/unLock?id='+id,
        method:'post'
    })
}